import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      // 启动要显示的界面
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Evenet使用示例"),
      ),
      body: MyHomeBody(),
    );
  }
}

class MyHomeBody extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: Stack(
        alignment: Alignment.center,
        children: [
          GestureDetector(
            onTapDown: (detail) {
              print('点击---大---的Widget');
            },
            child: Container(
              alignment: Alignment.center,
              width: 200,
              height: 200,
              color: Colors.brown,
            ),
          ),
          IgnorePointer(
            child: GestureDetector(
              onTapDown: (detail) {
                print('点击---小---的Widget');
              },
              child: Container(
                width: 100,
                height: 100,
                color: Colors.yellow,
              ),
            ),
          ),
        ],
      ),

    );
  }
}
